#include "stdafx.h"
#include <serialization/ioParamStructs.h>
#include <serialization/serialization.h>
#include <winsock/winsock_stub.h>

void listen_stub (
    __in  std::vector<char>& in_buf,
    __out std::vector<char>& out_buf
    )
{
//RECEIVE()
    Deserialize deserialize (in_buf);
    listen_in_inout listenIN;
    deserialize (listenIN);

    int ret = listen (listenIN.s_, listenIN.backlog_);
//SEND
    listen_out_inout listenOUT( (ret == 0) ? 0 : WSAGetLastError() );
    
    Serialize(deserialize.get_header(), listenOUT, out_buf);
}
